package com.ccys.db.entity;

import com.ccys.db.rely.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
* Created by Mybatis Generator on 2023/12/29
*/
@Data
@ApiModel("问诊费用,id同booking")
@Table(name = "tbl_booking_fee")
@NoArgsConstructor
@AllArgsConstructor
public class TblBookingFee extends BaseEntity {

    @Column(name = "booking_id")
    private String bookingId;

    /**
     * 是否waive掉问诊费用
     */
    @Column(name = "waive_consultation_fee_flag")
    @ApiModelProperty("是否waive掉问诊费用")
    private Integer waiveConsultationFeeFlag;

    /**
     * waive掉的问诊费用
     */
    @Column(name = "waive_consultation_fee")
    @ApiModelProperty("waive掉的问诊费用")
    private BigDecimal waiveConsultationFee;

    /**
     * 抹掉问诊费用类型: 1 follow up ;2 health screening review ; 3unsuitable for teleconsult ; 4whitecoat family ; 5referral ; 6tech issues ; 7ID/Account issues ; 8Demo ; 0others
     */
    @Column(name = "waive_consultation_fee_type")
    @ApiModelProperty("抹掉问诊费用类型: 1 follow up ;2 health screening review ; 3unsuitable for teleconsult ; 4whitecoat family ; 5referral ; 6tech issues ; 7ID/Account issues ; 8Demo ; 0others")
    private Integer waiveConsultationFeeType;

    /**
     * 是否waive掉快递费用
     */
    @Column(name = "waive_delivery_fee_flag")
    @ApiModelProperty("是否waive掉快递费用")
    private Integer waiveDeliveryFeeFlag;

    /**
     * Waive掉的快递费用
     */
    @Column(name = "waive_delivery_fee")
    @ApiModelProperty("Waive掉的快递费用")
    private BigDecimal waiveDeliveryFee;

    /**
     * 是否waive掉药费
     */
    @Column(name = "waive_medication_fee_flag")
    @ApiModelProperty("是否waive掉药费")
    private Integer waiveMedicationFeeFlag;

    /**
     * waive掉的药费,不包含package
     */
    @Column(name = "waive_medication_fee")
    @ApiModelProperty("waive掉的药费,不包含package")
    private BigDecimal waiveMedicationFee;

    /**
     * 是否waive掉practice费用
     */
    @Column(name = "waive_practice_fee_flag")
    @ApiModelProperty("是否waive掉practice费用")
    private Integer waivePracticeFeeFlag;

    /**
     * 是否waive掉医疗服务费用
     */
    @Column(name = "waive_medical_service_flag")
    @ApiModelProperty("是否waive掉医疗服务费用")
    private Integer waiveMedicalServiceFlag;

    /**
     * waive掉的医疗服务费用,不包含package
     */
    @Column(name = "waive_medical_service_fee")
    @ApiModelProperty("waive掉的医疗服务费用,不包含package")
    private BigDecimal waiveMedicalServiceFee;

    /**
     * 根据计算Promo code的抵扣金额
     */
    @Column(name = "promo_code_discount_amount")
    @ApiModelProperty("根据计算Promo code的抵扣金额")
    private BigDecimal promoCodeDiscountAmount;

    /**
     * GST
     */
    @Column(name = "tax_rate")
    @ApiModelProperty("GST")
    private BigDecimal taxRate;

    /**
     * 0:standard_fee,total_amount都包含税费,1:standard_fee不含税费,total_amount含税,目前只有印尼是0，todo可能可以去掉
     */
    @Column(name = "tax_rate_type")
    @ApiModelProperty("0:standard_fee,total_amount都包含税费,1:standard_fee不含税费,total_amount含税,目前只有印尼是0，todo可能可以去掉")
    private Integer taxRateType;

    /**
     * 税前问诊费用
     */
    @Column(name = "consultation_fee")
    @ApiModelProperty("税前问诊费用")
    private BigDecimal consultationFee;



    /**
     * 药物的税前费用
     */
    @Column(name = "prescription_fee")
    @ApiModelProperty("药物的税前费用")
    private BigDecimal prescriptionFee;

    /**
     * 打包药品的费用
     */
    @Column(name = "package_prescription_fee")
    @ApiModelProperty("打包药品的费用")
    private BigDecimal packagePrescriptionFee;

    /**
     * 医疗服务的税前费用
     */
    @Column(name = "medical_service_fee")
    @ApiModelProperty("医疗服务的税前费用")
    private BigDecimal medicalServiceFee;

    /**
     * 打包医疗服务的费用
     */
    @Column(name = "package_medical_service_fee")
    @ApiModelProperty("打包医疗服务的费用")
    private BigDecimal packageMedicalServiceFee;


    @ApiModelProperty("配套报销的home based fee")
    @Column(name = "service_type_claimable")
    private Integer serviceTypeClaimable;

    /**
     * 病人需要支付的home based fee.使用配套时，记录配套中设置的home based fee减去(service_type_claimable+service_type_billable),不使用配套时记录tbl_service_type中设置的费用减去(service_type_claimable+service_type_billable)
     */
    @Column(name = "service_type_fee")
    @ApiModelProperty("病人需要支付的home based fee.使用配套时，记录配套中设置的home based fee减去(service_type_claimable+service_type_billable),不使用配套时记录tbl_service_type中设置的费用减去(service_type_claimable+service_type_billable)")
    private BigDecimal serviceTypeFee;

    /**
     * 配套有设置报销的home based fee
     */
    @Column(name = "service_type_billable")
    @ApiModelProperty("在delta版本中公司需要支付的home based fee")
    private BigDecimal serviceTypeBillable;

    /**
     * 需要支付的cdmp购买费用
     */
    @Column(name = "cdmp_programme_fee")
    @ApiModelProperty("需要支付的cdmp购买费用")
    private BigDecimal cdmpProgrammeFee;

    /**
     * 医生端填写的practice fee
     */
    @Column(name = "practice_fee")
    @ApiModelProperty("医生端填写的practice fee")
    private BigDecimal practiceFee;

    /**
     * 快递费用
     */
    @Column(name = "delivery_fee")
    @ApiModelProperty("快递费用")
    private BigDecimal deliveryFee;

    /**
     * tax_rate_type = 0时计算含税总价，tax_rate_type = 1时计算不含税总价
     */
    @Column(name = "standard_fee")
    @ApiModelProperty("tax_rate_type = 0时计算含税总价，tax_rate_type = 1时计算不含税总价")
    private BigDecimal standardFee;

    /**
     * 含税总价
     */
    @Column(name = "total_amount")
    @ApiModelProperty("含税总价")
    private BigDecimal totalAmount;

    /**
     * 排除co-payment,rembersement,yearly limit后公司可claim的原始金额
     */
    @Column(name = "claim_cap")
    @ApiModelProperty("排除co-payment,rembersement,yearly limit后公司可claim的原始金额")
    private BigDecimal claimCap;

    /**
     * 配套设置的co-payment加上(1-rembersement percentage)*claim_cap，如果得出值大于claim_cap,则直接等于claim_cap
     */
    @Column(name = "co_pay")
    @ApiModelProperty("配套设置的co-payment加上(1-rembersement percentage)*claim_cap，如果得出值大于claim_cap,则直接等于claim_cap")
    private BigDecimal coPay;

    /**
     * 公司实际需要支付的费用(根据配套计算出的claim的费用，需要排除co-payment,rembersement以及yearly limit设置相关金额)
     */
    @ApiModelProperty("公司实际需要支付的费用(根据配套计算出的claim的费用，需要排除co-payment,rembersement以及yearly limit设置相关金额)")
    private BigDecimal benefits;

    /**
     * 配套不可报销的金额加上超出配套yearly设置的金额
     */
    @ApiModelProperty("配套不可报销的金额加上超出配套yearly设置的金额")
    private BigDecimal excess;

    /**
     * 总支付金额
     */
    @Column(name = "total_amount_paid")
    @ApiModelProperty("总支付金额")
    private BigDecimal totalAmountPaid;











    /**
     * SP医生设置的费用id
     */
    @Column(name = "consult_fee_id")
    @ApiModelProperty("SP医生设置的费用id")
    private String consultFeeId;

    /**
     * 存储doctor_consult_fee中的label 加上(rate)
     */
    @Column(name = "consult_fee_text")
    @ApiModelProperty("存储doctor_consult_fee中的label 加上(rate)")
    private String consultFeeText;

    /**
     * SP医生价格设置的label,GP为null
     */
    @Column(name = "consultation_fee_label")
    @ApiModelProperty("SP医生价格设置的label,GP为null")
    private String consultationFeeLabel;

    /**
     * benefit设置的discount label
     */
    @Column(name = "corporate_discount_label")
    @ApiModelProperty("benefit设置的discount label")
    private String corporateDiscountLabel;

    /**
     * benefit设置的discount计算出来的优惠金额
     */
    @Column(name = "corporate_discount_amount")
    @ApiModelProperty("benefit设置的discount计算出来的优惠金额")
    private BigDecimal corporateDiscountAmount;

    /**
     * Waive掉问诊费用的理由
     */
    @Column(name = "waive_consultation_reason")
    @ApiModelProperty("Waive掉问诊费用的理由")
    private String waiveConsultationReason;

    /**
     * Waive掉快递费用理由
     */
    @Column(name = "waive_delivery_reason")
    @ApiModelProperty("Waive掉快递费用理由")
    private String waiveDeliveryReason;

    /**
     * Waive掉药费的理由
     */
    @Column(name = "waive_medication_reason")
    @ApiModelProperty("Waive掉药费的理由")
    private String waiveMedicationReason;

    /**
     * waive掉practice的理由
     */
    @Column(name = "waive_practice_reason")
    @ApiModelProperty("waive掉practice的理由")
    private String waivePracticeReason;

    /**
     * waive掉医疗服务的理由
     */
    @Column(name = "waive_medical_service_reason")
    @ApiModelProperty("waive掉医疗服务的理由")
    private String waiveMedicalServiceReason;


    @Column(name = "bin_discount_amount")
    private BigDecimal binDiscountAmount;

    @ApiModelProperty("除去waive费用的原价税费")
    @Column(name = "tax_fee")
    private BigDecimal taxFee;

    @ApiModelProperty("是否为after hour的问诊")
    @Column(name = "is_surcharge")
    private Integer isSurcharge;

    //================================2024-01-26新增字段============================
    @ApiModelProperty("货币符号")
    @Column(name = "currency")
    private String currency;

    @ApiModelProperty("支付时间")
    @Column(name = "payment_at")
    private Date paymentAt;

    @ApiModelProperty("三方支付机构标识")
    @Column(name = "payment_vendor")
    private String paymentVendor;

    @ApiModelProperty("三方机构支付的id")
    @Column(name = "payment_id")
    private String paymentId;

    @ApiModelProperty("印尼benefit包含的voucher信息json，结构类似:{\"voucher_code\":\"WCALLL\",\"voucher_shipping_amount\":10000.0,\"delivery_charge_benefit\":\"(Rp10.000)\"}")
    @Column(name = "voucher_delivery")
    private String voucherDelivery;

    @ApiModelProperty("印尼benefit包含的voucher 快递费用")
    @Column(name = "voucher_delivery_fee")
    private BigDecimal voucherDeliveryFee;

    @ApiModelProperty("印尼benefit包含的voucher 药品费用")
    @Column(name = "voucher_medication_fee")
    private BigDecimal voucherMedicationFee;

    @ApiModelProperty("如果问诊有开home based的服务，则保存Home based fee,如果只开了walk-in的服务，则保存Walk-in,没有开任何服务，留空")
    @Column(name = "service_type_name")
    private String serviceTypeName;

    @ApiModelProperty("是否展示service_type_name,0-不展示，1-展示")
    @Column(name = "show_in_bill")
    private Integer showInBill;

    @ApiModelProperty("App做页面切换判断使用:越南/柬埔寨的问诊 payment_type 设置为 1,上传支付信息确定完成修改为2，此时cms可以查看支付信息,印尼专科医生 payment_type = 3")
    @Column(name = "payment_type")
    private Integer paymentType;


    //================================2024-01-26新增字段结束============================

    @ApiModelProperty("三方实际快递费用 uParcel (tbl_booking_uparcel_log中response_data里的total_price) GAP (原tbl_third_party_booking_fee)")
    @Column(name = "delivery_third_fee")
    private BigDecimal deliveryThirdFee;

    @ApiModelProperty("三方快递类型 0 uParcel 1 GAP")
    @Column(name = "delivery_third_type")
    private BigDecimal deliveryThirdType;


}
